use TestHelper;
use EntityBagTestHelper;
use Action;
use ActionManager;

sub testActionPop{
    my ($mgr) = shift;

    my @actions = @_;
    my $size = scalar(@actions);

    print "Probando pila de acciones\n";
    my $a;
    my $fromMgr;
    my $err = 0;
    @actions = reverse @actions;
    for(my $i = 0; $i<$size; $i++){
	$a = pop(@actions);
	$fromMgr = $mgr->pop;
	if($a ne $fromMgr){
	    print "--->ERROR: $a ne $fromMgr\n";
	    $err = 1;
	}else{
	    print "     >> OK\n";
	}
    }

    if(!$err){
	print "    OK\n";
    }

}

1;
